# Which compiler
# CC = gcc
# AR = ar
# AT = @

include $(PROJ_ROOT_PATH)/config.mk

# source file
SRCS += syscom.c


OBJS = $(patsubst %.c,%.o,$(SRCS))


# Option for development
CFLAGS += -g -Wall
# CXXFLAGS =
# Option for release
# CFLAGS = -O -Wall

# Where are include files kept
CFLAGS += -I$(MIDDLEWARE_PATH)
CFLAGS += -I$(MIDDLEWARE_PATH)/bipbuffer

CFLAGS += -D$(OS)

TARGET = libsyscom.a


all: $(OBJS)
	$(AT)$(AR) rcs $(TARGET) $^
	$(AT)mv $(TARGET) $(LIBS_PATH)

$(OBJS):%.o:%.c
	$(AT)$(CC) $(CFLAGS) $(INCLUDES) $(LIBS) -c $^ -o $@


.PHONY: clean
clean:
	$(AT)-rm -f $(OBJS)
